﻿#ifndef LOGINDIALOG_H
#define LOGINDIALOG_H

#include <QDialog>

QT_BEGIN_NAMESPACE
namespace Ui {
class LoginDialog;
}
QT_END_NAMESPACE

class LoginDialog : public QDialog
{
    Q_OBJECT

public:
    LoginDialog(QWidget* parent = nullptr);
    ~LoginDialog();

    void updateLoginInfo();

protected:
    void mousePressEvent(QMouseEvent* event);
    void mouseMoveEvent(QMouseEvent* event);
    bool eventFilter(QObject* watched, QEvent* event);

private slots:
    void on_btnLogin_clicked();
    void on_btnClose_clicked();
    void onLoginSuccess();
    void onLoginError(int api, const QString& msg);

private:
    Ui::LoginDialog* ui;
    QPoint           m_start;
};
#endif   // LOGINDIALOG_H
